Structures
Traversal function
w conductor=root;
w // Makes sure there is a place to start
w if(conductor!=NULL) {
w while(conductor->next!=NULL) {
w cout<<conductor->x;
w conductor=conductor->next;
w }
w cout<<conductor->x;
w}
To print a linked list, the traversal function is almost the same. It is necessary to ensure that the last element is printed after the while loop terminates.

| An example shown here is a simple function to add up all of the integers in a single dimensioned array.
| The final output is necessary because the while loop will not run once it reaches the last node, but it will still be necessary to output the contents of the next node. Consequently, the last output deals with this.